package com.ironman.mes;

import org.noear.solon.Solon;
import org.noear.solon.annotation.SolonMain;
import org.noear.solon.core.event.AppInitEndEvent;
import org.noear.solon.core.event.AppPluginLoadEndEvent;
import org.noear.solon.web.cors.CrossFilter;

@SolonMain
public class App {
    public static void main(String[] args) {
        Solon.start(App.class, args, app -> {
            app.enableWebSocket(true);
            app.filter(-1, new CrossFilter().allowedOrigins("*"));
            app.onEvent(AppInitEndEvent.class, e -> {
                System.out.println("app init");
            }).onEvent(AppPluginLoadEndEvent.class, e -> {
                System.out.println("app plugin load");
            });
        });
    }
}